package main.java.FSMDE.models;

import java.util.UUID;

import main.java.ERMDE.models.INameable;
import main.java.ERMDE.models.IStrongEntity;


public abstract class Transition implements INameable, IStrongEntity {

	protected String name;
	protected UUID id;
	protected TransitionType type;
	protected Interface source;
	protected Interface destination;

	public static Transition create(String transitionName,
			TransitionType transitionType) {
		return FactoryTransition.create(transitionName, transitionType);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public UUID getId() {
		return id;
	}

	public void setId(UUID id) {
		this.id = id;
	}

	public TransitionType getType() {
		return type;
	}

	public void setType(TransitionType type) {
		this.type = type;
	}

	public Interface getSource() {
		return source;
	}

	public void setSource(Interface source) {
		this.source = source;
	}

	public Interface getDestination() {
		return destination;
	}

	public void setDestination(Interface destination) {
		this.destination = destination;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public boolean isEquilibrated() {
		return ((this.destination != null) && (this.source != null));
	}

	public String getModelDescription() {
		return "";
	}

}
